<template>
  <view class="success-view" :style="{height: viewHeight}">
    <view class="toast">
      <h1>上传成功</h1>
      <h4>已提交审核，审核结果等待通知...</h4>
    </view>
    <view class="back-btn" @click="toHome">
      返回首页
    </view>
  </view>
</template>
<script setup>
import {ref} from 'vue'
import {onShow} from "@dcloudio/uni-app";
import {getTitleViewHeight} from "@/utils/utils";

const viewHeight = ref('')

const toHome = () => {
  uni.switchTab({
    url: '/pages/index/index'
  })
}

onShow(() => {
  viewHeight.value = `calc(100vh - ${getTitleViewHeight() + 45}rpx)`
})
</script>
<style scoped lang=less>
.success-view {
  position: relative;
  .toast {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-family: 'ali-l';
    h1 {
      color: #333;
    }
    h4 {
      color: #999;
    }
  }
  .back-btn {
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50vw;
    height: 80rpx;
    line-height: 80rpx;
    background-color: #00a4ff;
    color: #fff;
    font-size: 30rpx;
    text-align: center;
    border-radius: 20rpx;
  }
}
</style>
